//
// Created by Zhangwj on 2023/9/27.
//

#ifndef COMPILE_TASK2_RELEXPNODE_H
#define COMPILE_TASK2_RELEXPNODE_H


#include "SyntaxTreeNode.h"
#include "../Parser.h"

class RelExpNode : public SyntaxTreeNode {
public:
    //RelExp → AddExp | RelExp ('<' | '>' | '<=' | '>=') AddExp
    //改写为 RelExp -> AddExp { ('<' | '>' | '<=' | '>=') AddExp }
    std::vector<std::unique_ptr<AddExpNode>> AddExps;
    std::vector<LexType> Ops;

    static std::unique_ptr<RelExpNode> RelExpParser(Parser& parser);
};


#endif //COMPILE_TASK2_RELEXPNODE_H
